home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / MISC.SWG / 0042_Convert STRING to INTEGER.pas < prev    next >
Pascal/Delphi Source File  |  1993-09-26  |  587b  |  19 lines

  1. {*****************************************************************************
  2.  * Function ...... STOI()
  3.  * Purpose ....... To convert a string to an integer
  4.  * Parameters .... cNum       String to convert to integer format
  5.  * Returns ....... cNum as a numeric integer
  6.  * Notes ......... None
  7.  * Author ........ Martin Richardson
  8.  * Date .......... May 13, 1992
  9.  *****************************************************************************}
  10. FUNCTION STOI( cNum: STRING ): LONGINT;
  11. VAR
  12.    c: INTEGER;
  13.    i: LONGINT;
  14. BEGIN
  15.      VAL( cNum, i, c );
  16.      STOI := i;
  17. END;
  18.  
  19.